package com.zsf.pojo;

public class User {
    private String name;

//    //只要new这个user，这个方法就会被调用
//    public User(){
//        System.out.println("user的无参构造");
//    }

    //有参构造
    public User(String name){
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public void show(){
        System.out.println("name="+name);
    }
}
